{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Alessandro Parisi \n",
      "last updated: 2019-01-30 \n",
      "\n",
      "CPython 3.5.4\n",
      "IPython 6.1.0\n",
      "\n",
      "numpy 1.13.3\n",
      "pandas 0.20.3\n",
      "matplotlib 2.0.2\n",
      "sklearn 0.20.0\n",
      "seaborn 0.8.0\n"
     ]
    }
   ],
   "source": [
    "%load_ext watermark\n",
    "%watermark -a \"Alessandro Parisi\" -u -d -v -p numpy,pandas,matplotlib,sklearn,seaborn\n",
    "# to install watermark launch 'pip install watermark' at command line"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x9f82c3f128>]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4lfXdx/H3jxnC3juEDSFhhiFYRUFFRBCxrbZuLXbY\n9VghiLNQxNGqT621qIhWq7UEZIiK4MCtgJKEEFZYgUBCGAmEkHG+zx+Jz4WUEXJOcp9z8nldlxdn\nwf0RTj755T73/b2dmSEiIqGvhtcBREQkMFToIiJhQoUuIhImVOgiImFChS4iEiZU6CIiYUKFLiIS\nJlToIiJhQoUuIhImalXlxlq0aGHR0dFVuUkRkZC3Zs2a/WbW8myvq9JCj46OZvXq1VW5SRGRkOec\n21Ge12mXi4hImFChi4iECRW6iEiYUKGLiIQJFbqISJg4a6E75+Y657KccymneO4u55w551pUTjwR\nESmv8qzQ5wFjTn7QOdcRuBTYGeBMIiJSAWctdDNbBRw4xVNPAFMAXcNOROQ0Dh4t5KEl68ktKKr0\nbVVoH7pzbgKw28zW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azImABMNzjTGezzznXFqDs1yyP85yVc+5mYBzwUwveY7C7UvqNfV3Z11sHYK1zrk2gNxQKhR4y\nF6N2zjlK9/FuMLO/eJ3nTMxsmpl1MLNoSv9O3zezoF1BmtleYJdzrmfZQ6OAVA8jnc1OYJhzLrLs\nfTGKIP4Qt8xi4Kay2zcBizzMclbOuTGU7jIcb2b5Xuc5HTNLNrNWZhZd9vWWAQwse08HVNAXetmH\nHt9djHoD8EYQX4x6BHADpavdb8v+G+t1qDDya+BV51wS0B+Y5XGe0yr7SWI+sBZIpvRrLWjObHTO\nvQZ8DvR0zmU4524DZgOXOOc2U/oTxmwvM57oNHmfBhoC75V9rT3racgyp8laNdsO3p9SRETkXAT9\nCl1ERMpHhS4iEiZU6CIiYUKFLiISJlToIiJhQoUuIhImVOgiImFChS4iEib+DwCrmYD9RS+aAAAA\nAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x9f8291da58>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Execute plot() inline without calling show()\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "import numpy as np \n",
    "\n",
    "import matplotlib.pyplot as plt  \n",
    "\n",
    "plt.plot(np.arange(15), np.arange(15))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model Prediction for new data: $13.73\n"
     ]
    }
   ],
   "source": [
    "import numpy as np \n",
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "# X is a matrix that represents the training dataset\n",
    "# y is a vector of weights, to be associated with input dataset\n",
    "\n",
    "X = np.array([[3], [5], [7], [9], [11]]).reshape(-1, 1) \n",
    "y = [8.0, 9.1, 10.3, 11.4, 12.6]  \n",
    "\n",
    "lreg_model = LinearRegression()  \n",
    "lreg_model.fit(X, y) \n",
    "\n",
    "# New data (unseen before)\n",
    "new_data = np.array([[13]]) \n",
    "\n",
    "print('Model Prediction for new data: $%.2f' %  lreg_model.predict(new_data)[0]  ) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sepal length (cm)</th>\n",
       "      <th>sepal width (cm)</th>\n",
       "      <th>petal length (cm)</th>\n",
       "      <th>petal width (cm)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>150.000000</td>\n",
       "      <td>150.000000</td>\n",
       "      <td>150.000000</td>\n",
       "      <td>150.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>5.843333</td>\n",
       "      <td>3.057333</td>\n",
       "      <td>3.758000</td>\n",
       "      <td>1.199333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.828066</td>\n",
       "      <td>0.435866</td>\n",
       "      <td>1.765298</td>\n",
       "      <td>0.762238</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>4.300000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.100000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>5.100000</td>\n",
       "      <td>2.800000</td>\n",
       "      <td>1.600000</td>\n",
       "      <td>0.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>5.800000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>4.350000</td>\n",
       "      <td>1.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>6.400000</td>\n",
       "      <td>3.300000</td>\n",
       "      <td>5.100000</td>\n",
       "      <td>1.800000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>7.900000</td>\n",
       "      <td>4.400000</td>\n",
       "      <td>6.900000</td>\n",
       "      <td>2.500000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       sepal length (cm)  sepal width (cm)  petal length (cm)  \\\n",
       "count         150.000000        150.000000         150.000000   \n",
       "mean            5.843333          3.057333           3.758000   \n",
       "std             0.828066          0.435866           1.765298   \n",
       "min             4.300000          2.000000           1.000000   \n",
       "25%             5.100000          2.800000           1.600000   \n",
       "50%             5.800000          3.000000           4.350000   \n",
       "75%             6.400000          3.300000           5.100000   \n",
       "max             7.900000          4.400000           6.900000   \n",
       "\n",
       "       petal width (cm)  \n",
       "count        150.000000  \n",
       "mean           1.199333  \n",
       "std            0.762238  \n",
       "min            0.100000  \n",
       "25%            0.300000  \n",
       "50%            1.300000  \n",
       "75%            1.800000  \n",
       "max            2.500000  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd  \n",
    "from sklearn import datasets\n",
    "\n",
    "iris = datasets.load_iris()\n",
    "iris_df = pd.DataFrame(iris.data, columns = iris.feature_names)\n",
    "\n",
    "iris_df.head()\n",
    "iris_df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Py35",
   "language": "python",
   "name": "py35"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
